<?php
use Core\View;
use Core\Response;
use Core\Request;
use Libs\ValidationCode;
use Libs\FileLog;
use Core\Model;

class _index
{
    public function index()
    {
        View::display('index');
    }

    //生成图片验证码
    public function vcode()
    {
        $width = Request::Get('w', 80);
        $height = Request::Get('h', 40);
        $code=new ValidationCode($width, $height, 5);
        $code->showImage();
        $_SESSION['reg_vcode'] = $code->getCheckCode();
        $_SESSION['reg_vcode_lasttime'] = REQUEST_TIME;
        FileLog::info($_SESSION['reg_vcode'], 'user');
    }
}
